package com.ruoyi.settled.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 结算记录对象 settlement_record
 * 
 * @author huangchen
 * @date 2025-01-05
 */
public class SettlementRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 结算编码 */
    @Excel(name = "结算编码")
    private String settlementCode;

    /** 合作方编码 */
    @Excel(name = "合作方编码")
    private String partnerCode;

    /** 结算类型 */
    @Excel(name = "结算类型")
    private String settlementType;

    /** 结算的总金额 */
    @Excel(name = "结算的总金额")
    private BigDecimal settlementAmount;


    /** 结算的总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal orderAmount;

    /** 结算方式 */
    @Excel(name = "结算方式")
    private String settlementMethod;

    /** 协议编码 */
    @Excel(name = "协议编码")
    private String agreementCode;

    /** 结算起始时间 */
    private Date startDate;

    /** 结算结束时间 */
    private Date endDate;

//    /** 货币单位 */
//    @Excel(name = "货币单位")
//    private String currencyUnit;

//    /** 税率 */
//    @Excel(name = "税率")
//    private BigDecimal taxRate;
//
//    /** 税额 */
//    @Excel(name = "税额")
//    private BigDecimal taxAmount;

    /** 实际支付日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际支付日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentDate;

    /** 结算状态 */
    @Excel(name = "结算状态")
    private String settlementStatus;

    /** 创建记录人员 */
    private String creator;

    /** 最后修改时间 */
    private Date modifyTime;

    /** 最后修改人 */
    private String lastModifiedBy;

    /** 结算详情信息 */
    private List<SettlementDetail> settlementDetailList;

    public void setSettlementCode(String settlementCode) 
    {
        this.settlementCode = settlementCode;
    }

    public String getSettlementCode() 
    {
        return settlementCode;
    }
    public void setPartnerCode(String partnerCode) 
    {
        this.partnerCode = partnerCode;
    }

    public String getPartnerCode() 
    {
        return partnerCode;
    }
    public void setSettlementType(String settlementType) 
    {
        this.settlementType = settlementType;
    }

    public String getSettlementType() 
    {
        return settlementType;
    }
    public void setSettlementAmount(BigDecimal settlementAmount) 
    {
        this.settlementAmount = settlementAmount;
    }

    public BigDecimal getSettlementAmount() 
    {
        return settlementAmount;
    }
    public void setSettlementMethod(String settlementMethod) 
    {
        this.settlementMethod = settlementMethod;
    }

    public String getSettlementMethod() 
    {
        return settlementMethod;
    }
    public void setAgreementCode(String agreementCode) 
    {
        this.agreementCode = agreementCode;
    }

    public String getAgreementCode() 
    {
        return agreementCode;
    }
    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }
    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }
//    public void setCurrencyUnit(String currencyUnit)
//    {
//        this.currencyUnit = currencyUnit;
//    }
//
//    public String getCurrencyUnit()
//    {
//        return currencyUnit;
//    }
//    public void setTaxRate(BigDecimal taxRate)
//    {
//        this.taxRate = taxRate;
//    }
//
//    public BigDecimal getTaxRate()
//    {
//        return taxRate;
//    }
//    public void setTaxAmount(BigDecimal taxAmount)
//    {
//        this.taxAmount = taxAmount;
//    }
//
//    public BigDecimal getTaxAmount()
//    {
//        return taxAmount;
//    }
//    public void setPaymentDate(Date paymentDate)
//    {
//        this.paymentDate = paymentDate;
//    }

    public Date getPaymentDate() 
    {
        return paymentDate;
    }
    public void setSettlementStatus(String settlementStatus) 
    {
        this.settlementStatus = settlementStatus;
    }

    public String getSettlementStatus() 
    {
        return settlementStatus;
    }
    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }
    public void setModifyTime(Date modifyTime) 
    {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() 
    {
        return modifyTime;
    }
    public void setLastModifiedBy(String lastModifiedBy) 
    {
        this.lastModifiedBy = lastModifiedBy;
    }

    public String getLastModifiedBy() 
    {
        return lastModifiedBy;
    }

    public List<SettlementDetail> getSettlementDetailList()
    {
        return settlementDetailList;
    }

    public void setSettlementDetailList(List<SettlementDetail> settlementDetailList)
    {
        this.settlementDetailList = settlementDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("settlementCode", getSettlementCode())
            .append("partnerCode", getPartnerCode())
            .append("settlementType", getSettlementType())
            .append("settlementAmount", getSettlementAmount())
            .append("orderAmount", getOrderAmount())
            .append("settlementMethod", getSettlementMethod())
            .append("agreementCode", getAgreementCode())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
//            .append("currencyUnit", getCurrencyUnit())
//            .append("taxRate", getTaxRate())
//            .append("taxAmount", getTaxAmount())
            .append("paymentDate", getPaymentDate())
            .append("settlementStatus", getSettlementStatus())
            .append("creator", getCreator())
            .append("modifyTime", getModifyTime())
            .append("lastModifiedBy", getLastModifiedBy())
            .append("remark", getRemark())
            .append("settlementDetailList", getSettlementDetailList())
            .toString();
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }
}
